let Game = function (cfg) {
    this.gid = cfg["gid"];
    this.name = cfg["name"];
    this.state = cfg["state"];
    this.version = cfg["version"];
    this.images = cfg["images"];
    this.currencyType = cfg["currencyType"];
};

Game.prototype.getGid = function () {
    return this.gid;
};

Game.prototype.getName = function () {
    return this.name;
};

Game.prototype.getState = function () {
    return this.state;
};

Game.prototype.getImages = function () {
    return this.images.slice(0);
};

Game.prototype.toJSON = function () {
    return {
        gid : this.gid,
        name : this.name,
        state: this.state,
        version: this.version,
        images: this.images.slice(0),
        currencyType: this.currencyType
    };
};

module.exports.create = function(cfg) {
    return new Game(cfg);
};

